//
//  PlayManager.h
//  lisure0.1
//
//  Created by xalo on 16/4/21.
//  Copyright © 2016年 Mr.wangYongxu. All rights reserved.
//

#import <Foundation/Foundation.h>

@class AVPlayer;

@protocol PlayManagerDelegate <NSObject>

@optional
- (void)playManagerFetchRestTime:(NSString *)restTime progress:(CGFloat)progress;
- (void)playManagerPlayRadioEnd;

@end
@interface PlayManager : NSObject

@property(nonatomic, retain)AVPlayer* player;//专门处理音频
@property(nonatomic, weak)id<PlayManagerDelegate> delegate;
@property(nonatomic, retain)NSTimer* timer;

+(instancetype)shareManager;
-(void)playRadio;
-(void)pauseRadio;
-(void)preoareToPlayRadiowithUrl:(NSString*)url;
-(NSInteger)fetchTotalTime;
-(NSInteger)fetchCurrentTime;
-(void)bySliderValueToPlayRadio:(CGFloat)progress;
@end
